#pragma once

#include <linux/types.h>
#include <linux/sched/prio.h>

struct rt_prio_array
{
    DECLARE_BITMAP(bitmap, MAX_RT_PRIO + 1); /* include 1 bit for delimiter */
    struct list_head queue[MAX_RT_PRIO];
};

/* Real-Time classes' related field in a runqueue: */
struct rt_rq
{
    struct rt_prio_array active;

    unsigned int rt_nr_running;
    unsigned int rr_nr_running;
    int rt_queued;

    struct
    {
        int curr; /* highest queued rt task prio */
#ifdef CONFIG_SMP
        int next; /* next highest */
#endif
    } highest_prio;

    bool overloaded;
};
